<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Phing API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/jquery-ui.css" type="text/css"></link><link rel="stylesheet" href="css/docblox/jquery-ui-1.8.16.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script><script type="text/javascript" src="js/jquery.tools.min.js"></script><script type="text/javascript" src="js/jquery.cookie.js"></script><script type="text/javascript" src="js/jquery.treeview.js"></script><script type="text/javascript">
            $(document).ready(function() {
                $(".filetree").treeview({
                    collapsed: true,
                    persist: "cookie"
                });

                $("#accordion").accordion({
                    collapsible: true,
                    autoHeight:  false,
                    fillSpace:   true
                });

                $(".tabs").tabs();
            });
        </script></head><body><div xmlns="" id="content">
<script xmlns:dbx="http://docblox-project.org/xsl/functions">

      function filterElements()
      {
        inherited = !$('#show-inherited').hasClass('deselected');
        public    = !$('#show-public').hasClass('deselected');
        protected = !$('#show-protected').hasClass('deselected');
        private   = !$('#show-private').hasClass('deselected');

        $('div.public').each(function(index, val) {
            $(val).toggle(public && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.protected').each(function(index, val) {
            $(val).toggle(protected && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.private').each(function(index, val) {
            $(val).toggle(private && !($(val).hasClass('inherited_from') && !inherited));
        });
      }

      $(document).ready(function() {
        $('a.gripper').click(function() {
            $(this).nextAll('div.code-tabs').slideToggle();
            $(this).children('img').toggle();
            return false;
        });

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').css('cursor', 'pointer');

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').click(function() {
            $(this).parent().nextAll('div.code-tabs').slideToggle();
            $(this).parent().prevAll('a.gripper').children('img').toggle();
            return false;
        });

        $('div.code-tabs').hide();
        $('a.gripper').show();
        $('div.code-tabs:empty').prevAll('a.gripper').html('');

        $('#show-public, #show-protected, #show-private, #show-inherited')
            .css('cursor', 'pointer')
            .click(function(){
                $(this).toggleClass('deselected');
                if ($(this).hasClass('deselected')) {
                  $(this).fadeTo('fast', '0.4');
                } else {
                  $(this).fadeTo('fast', '1.0');
                }
                filterElements();
                return false;
            });
        $('#show-protected, #show-private').click();

        // add the sliding behaviour to the file navigation and show it
        // it is initially hidden for non-JS users.
        $("#file-nav-box").show().hover(function() {
            $("#file-nav-container").slideDown(400);
        }, function() {
            $("#file-nav-container").slideUp(400);
        });
      });

      
    </script><h1 xmlns:dbx="http://docblox-project.org/xsl/functions" class="file">tasks/ext/pdo/PgsqlPDOQuerySplitter.php</h1>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" id="file-nav-box">
<div id="file-nav-options">
              Show:
              <img src="images/icons/visibility_public.png" id="show-public"><img src="images/icons/visibility_protected.png" id="show-protected"><img src="images/icons/visibility_private.png" id="show-private"><span class="attribute" id="show-inherited">inherited</span>
</div>
<div id="file-nav-container">
<ul id="file-nav"><li>
<a href="#classes"><img src="images/icons/class.png" height="14">
                          Classes
                      </a><ul><li><a href="#%5CPgsqlPDOQuerySplitter">\PgsqlPDOQuerySplitter</a></li></ul>
</li></ul>
<div style="clear: left;"></div>
</div>
<div id="file-nav-tab">
              Table of Contents
          </div>
</div>
<a xmlns:dbx="http://docblox-project.org/xsl/functions" name="top" class="anchor"></a><div id="file-description">
<p xmlns:dbx="http://docblox-project.org/xsl/functions" class="short-description">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" class="long-description"><p>This software consists of voluntary contributions made by many individuals
and is licensed under the LGPL. For more information please see
<a href="http://phing.info">http://phing.info</a>.</p></div>
</div>
<dl class="file-info">
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Package</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">phing.tasks.ext.pdo
         
    </dd>
<dt xmlns:dbx="http://docblox-project.org/xsl/functions">Version</dt>
<dd xmlns:dbx="http://docblox-project.org/xsl/functions">SVN: $Id: PgsqlPDOQuerySplitter.php 1274 2011-08-17 13:38:07Z mrook $
         
    </dd>
</dl>
<a name="classes" class="anchor"></a><a xmlns:dbx="http://docblox-project.org/xsl/functions" id="\PgsqlPDOQuerySplitter" class="anchor"></a><h2 xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">\PgsqlPDOQuerySplitter<div class="to-top"><a href="#top">jump to top</a></div>
</h2>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">
<small class="package"><b>Package: </b>phing\tasks\ext\pdo</small><p class="short-description">Splits PostgreSQL's dialect of SQL into separate queries</p>
<div class="long-description"><p>Unlike DefaultPDOQuerySplitter this uses a lexer instead of regular
expressions. This allows handling complex constructs like C-style comments
(including nested ones) and dollar-quoted strings.</p></div>
<dl class="class-info">
<dt>Parent(s)</dt>
<dd><a href="db_tasks_ext_pdo_PDOQuerySplitter.html#%5CPDOQuerySplitter">\PDOQuerySplitter</a></dd>
<dt>Author</dt>
<dd>
<a href="mailto:avb@php.net">Alexey Borzov</a>
         
    </dd>
<dt>Link</dt>
<dd>
<a href="http://www.phing.info/trac/ticket/499">http://www.phing.info/trac/ticket/499</a>
         
    </dd>
<dt>Link</dt>
<dd>
<a href="http://www.postgresql.org/docs/current/interactive/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING">http://www.postgresql.org/docs/current/interactive/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING</a>
         
    </dd>
<dt>Version</dt>
<dd>$Revision: 1274 $
         
    </dd>
</dl>
<h3>Constants</h3>
<div>
<a id="\PgsqlPDOQuerySplitter::STATE_NORMAL" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">STATE_NORMAL</span>
                = 0</code><div class="description"></div>
<div class="code-tabs"><dl class="constant-info"></dl></div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::STATE_SINGLE_QUOTED" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">STATE_SINGLE_QUOTED</span>
                = 1</code><div class="description"></div>
<div class="code-tabs"><dl class="constant-info"></dl></div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::STATE_DOUBLE_QUOTED" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">STATE_DOUBLE_QUOTED</span>
                = 2</code><div class="description"></div>
<div class="code-tabs"><dl class="constant-info"></dl></div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::STATE_DOLLAR_QUOTED" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">STATE_DOLLAR_QUOTED</span>
                = 3</code><div class="description"></div>
<div class="code-tabs"><dl class="constant-info"></dl></div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::STATE_COMMENT_LINEEND" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">STATE_COMMENT_LINEEND</span>
                = 4</code><div class="description"></div>
<div class="code-tabs"><dl class="constant-info"></dl></div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::STATE_COMMENT_MULTILINE" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">STATE_COMMENT_MULTILINE</span>
                = 5</code><div class="description"></div>
<div class="code-tabs"><dl class="constant-info"></dl></div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::STATE_BACKSLASH" class="anchor"></a><div class="constant publicC">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/constant.png" alt="Constant"> 
                <span class="highlight">STATE_BACKSLASH</span>
                = 6</code><div class="description"></div>
<div class="code-tabs"><dl class="constant-info"></dl></div>
<div class="clear"></div>
</div>
</div>
<h3>Properties</h3>
<div>
<a id="\PgsqlPDOQuerySplitter::$commentDepth" class="anchor"></a><div class="property protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected">int
                 <span class="highlight">$commentDepth</span>= '0'
                </code><div class="description">
<p class="short-description">Nesting depth of current multiline comment</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Default value</strong><code>0</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>int</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::$escape" class="anchor"></a><div class="property protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected">bool
                 <span class="highlight">$escape</span>= 'false'
                </code><div class="description">
<p class="short-description">Whether a backslash was just encountered in quoted string</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Default value</strong><code>false</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>bool</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::$inputIndex" class="anchor"></a><div class="property protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected">int
                 <span class="highlight">$inputIndex</span>= ''
                </code><div class="description">
<p class="short-description">Position in current source line</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>int</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::$line" class="anchor"></a><div class="property protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected">string
                 <span class="highlight">$line</span>= ''''
                </code><div class="description">
<p class="short-description">Current source line being examined</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Default value</strong><code>''</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>string</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::$quotingTag" class="anchor"></a><div class="property protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected">string
                 <span class="highlight">$quotingTag</span>= ''''
                </code><div class="description">
<p class="short-description">Current dollar-quoting "tag"</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Default value</strong><code>''</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>string</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::$state" class="anchor"></a><div class="property protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected">int
                 <span class="highlight">$state</span>= 'self::STATE_NORMAL'
                </code><div class="description">
<p class="short-description">Current lexer state, one of STATE_* constants</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Default value</strong><code>self::STATE_NORMAL</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>int</dd>
</dl>
</div>
<div class="clear"></div>
</div>
</div>
<h3>Methods</h3>
<div>
<a id="\PgsqlPDOQuerySplitter::checkDollarQuote()" class="anchor"></a><div class="method protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"><span class="highlight">checkDollarQuote</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          string | bool</code><div class="description"><p class="short_description">Checks whether symbols after $ are a valid dollar-quoting tag</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>string | bool</td>
<td>Dollar-quoting "tag" if it is present, false otherwise</td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::getc()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getc</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          string | bool</code><div class="description"><p class="short_description">Gets next symbol from the input, false if at end</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Returns</strong><table class="argument-info">
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<td>string | bool</td>
<td></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::nextQuery()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">nextQuery</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description"></p></div>
<div class="code-tabs"></div>
<div class="clear"></div>
</div>
<a id="\PgsqlPDOQuerySplitter::ungetc()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">ungetc</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Bactracks one symbol on the input</p></div>
<div class="code-tabs"><div class="long-description"><p>NB: we don't need ungetc() at the start of the line, so this case is
not handled.</p></div></div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<small xmlns="" class="footer">Documentation was generated by <a href="http://docblox-project.org">DocBlox 0.17.1</a>.
    </small></body></html>
